package com.siyu.observer;

import sun.jvm.hotspot.utilities.Observable;

/**
 * @Author: siyu
 * @CreateTime: 2024-10-07
 * @Version: 1.0
 */
public class GPer extends Observable {

    private static final GPer gper = new GPer();

    private GPer() {}

    public static GPer getInstance(){
        return gper;
    }

    public void publishQuestion(Question question){
        String name = "GPer 生态圈";
        System.out.println(question.getUsername() + "在"  + name + "提交了一个问题");
        setChanged();
        notifyObservers(question);
    }
}
